(function() {
    var oList = document.getElementById('list');
    var tim = null;
    var speed;

    function move(obj, L) {
        clearInterval(obj.tim)
        obj.tim = setInterval(function() {
            speed = (L - obj.children[0].offsetHeight) / 8
            speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
            if (obj.children[0].offsetHeight == L) {
                clearInterval(obj.tim)
            } else {
                obj.children[0].style.height = obj.children[0].offsetHeight + speed + "px"
            }

        }, 24)
    }
    for (var i = 0; i < oList.children.length; i++) {
        oList.children[i].onmouseover = function() {
            move(this, this.children[0].children[0].offsetHeight * this.children[0].children.length)
        }
        oList.children[i].onmouseout = function() {
            move(this, 0)
        }

    }
})();
